
class MarketBatchSaleListModel {
  List<MarketBatchSaleListModelItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  MarketBatchSaleListModel({this.list, this.pageNum, this.pageSize, this.total, this.totalPage});

  MarketBatchSaleListModel.fromJson(Map<String, dynamic> json) {
    list = json["list"] == null ? null : (json["list"] as List).map((e) => MarketBatchSaleListModelItem.fromJson(e)).toList();
    pageNum = json["pageNum"];
    pageSize = json["pageSize"];
    total = json["total"];
    totalPage = json["totalPage"];
  }

  static List<MarketBatchSaleListModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(MarketBatchSaleListModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }

  MarketBatchSaleListModel copyWith({
    List<MarketBatchSaleListModelItem>? list,
    int? pageNum,
    int? pageSize,
    int? total,
    int? totalPage,
  }) => MarketBatchSaleListModel(
    list: list ?? this.list,
    pageNum: pageNum ?? this.pageNum,
    pageSize: pageSize ?? this.pageSize,
    total: total ?? this.total,
    totalPage: totalPage ?? this.totalPage,
  );
}

class MarketBatchSaleListModelItem {
  String? collectionName;
  String? id;
  dynamic? salePrice;
  String? status;
  String? tokenId;
  bool isSelect=false;
  bool? isMyself;

  MarketBatchSaleListModelItem({this.collectionName, this.id, this.salePrice, this.status, this.tokenId,this.isSelect=false,this.isMyself});

  MarketBatchSaleListModelItem.fromJson(Map<String, dynamic> json) {
    collectionName = json["collectionName"];
    id = json["id"];
    salePrice = json["salePrice"];
    status = json["status"];
    tokenId = json["tokenId"];
      isMyself = json["isMyself"];
    isSelect = false;
  }

  static List<MarketBatchSaleListModelItem> fromList(List<Map<String, dynamic>> list) {
    return list.map(MarketBatchSaleListModelItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["collectionName"] = collectionName;
    _data["id"] = id;
    _data["salePrice"] = salePrice;
    _data["status"] = status;
    _data["isSelect"] = isSelect;
    _data["tokenId"] = tokenId;
     _data["isMyself"] = isMyself;
    return _data;
  }

  MarketBatchSaleListModelItem copyWith({
    String? collectionName,
    String? id,
    dynamic? salePrice,
    String? status,
    String? tokenId,
    bool? isMyself,
     bool isSelect=false
  }) => MarketBatchSaleListModelItem(
    collectionName: collectionName ?? this.collectionName,
    id: id ?? this.id,
    salePrice: salePrice ?? this.salePrice,
    status: status ?? this.status,
    isSelect: isSelect ,
    tokenId: tokenId ?? this.tokenId,
     isMyself: isMyself ?? this.isMyself,
  );
}